!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s}); jQuery(function($){ if($(document).scrollTop() > 0){ $('.site-header').addClass('light'); } $(document).on('scroll', function(){ if($(document).scrollTop() > 0){ $('.site-header').addClass('light'); }else{ $('.site-header').removeClass('light'); }}); }); jQuery(function($){ let acc=document.getElementsByClassName("accordion"); let i; for (i=0; i < acc.length; i++){ acc[i].addEventListener("click", function(){ this.classList.toggle("active"); }); }}); /* jQuery(function($){ $.localScroll({ duration: 750 }); }); */; (function (){ 'use strict'; if(window&&window.addEventListener){ var cache=Object.create(null); var checkUseElems; var tid; var debouncedCheck=function (){ clearTimeout(tid); tid=setTimeout(checkUseElems, 100); }; var unobserveChanges=function (){ return; }; var observeChanges=function (){ var observer; window.addEventListener('resize', debouncedCheck, false); window.addEventListener('orientationchange', debouncedCheck, false); if(window.MutationObserver){ observer=new MutationObserver(debouncedCheck); observer.observe(document.documentElement, { childList: true, subtree: true, attributes: true }); unobserveChanges=function (){ try { observer.disconnect(); window.removeEventListener('resize', debouncedCheck, false); window.removeEventListener('orientationchange', debouncedCheck, false); } catch (ignore){}};}else{ document.documentElement.addEventListener('DOMSubtreeModified', debouncedCheck, false); unobserveChanges=function (){ document.documentElement.removeEventListener('DOMSubtreeModified', debouncedCheck, false); window.removeEventListener('resize', debouncedCheck, false); window.removeEventListener('orientationchange', debouncedCheck, false); };}}; var createRequest=function (url){ function getHostname(href){ var a=document.createElement('a'); a.href=href; return a.hostname; } var Request; var hname=location.hostname; var hname2; if(window.XMLHttpRequest){ Request=new XMLHttpRequest(); hname2=getHostname(url); if(Request.withCredentials===undefined&&hname2!==''&&hname2!==hname){ Request=XDomainRequest||undefined; }else{ Request=XMLHttpRequest; }} return Request; }; var xlinkNS='http://www.w3.org/1999/xlink'; checkUseElems=function (){ var base; var bcr; var fallback=''; var hash; var href; var i; var inProgressCount=0; var isHidden; var Request; var url; var uses; var xhr; function observeIfDone(){ inProgressCount -=1; if(inProgressCount===0){ unobserveChanges(); observeChanges(); }} function attrUpdateFunc(spec){ return function (){ if(cache[spec.base]!==true){ spec.useEl.setAttributeNS(xlinkNS, 'xlink:href', '#' + spec.hash); }};} function onloadFunc(xhr){ return function (){ var body=document.body; var x=document.createElement('x'); var svg; xhr.onload=null; x.innerHTML=xhr.responseText; svg=x.getElementsByTagName('svg')[0]; if(svg){ svg.setAttribute('aria-hidden', 'true'); svg.style.position='absolute'; svg.style.width=0; svg.style.height=0; svg.style.overflow='hidden'; body.insertBefore(svg, body.firstChild); } observeIfDone(); };} function onErrorTimeout(xhr){ return function (){ xhr.onerror=null; xhr.ontimeout=null; observeIfDone(); };} unobserveChanges(); uses=document.getElementsByTagName('use'); for (i=0; i < uses.length; i +=1){ try { bcr=uses[i].getBoundingClientRect(); } catch (ignore){ bcr=false; } href=uses[i].getAttributeNS(xlinkNS, 'href'); if(href&&href.split){ url=href.split('#'); }else{ url=["", ""]; } base=url[0]; hash=url[1]; isHidden=bcr&&bcr.left===0&&bcr.right===0&&bcr.top===0&&bcr.bottom===0; if(bcr&&bcr.width===0&&bcr.height===0&&!isHidden){ if(fallback&&!base.length&&hash&&!document.getElementById(hash)){ base=fallback; } if(base.length){ xhr=cache[base]; if(xhr!==true){ setTimeout(attrUpdateFunc({ useEl: uses[i], base: base, hash: hash }), 0); } if(xhr===undefined){ Request=createRequest(base); if(Request!==undefined){ xhr=new Request(); cache[base]=xhr; xhr.onload=onloadFunc(xhr); xhr.onerror=onErrorTimeout(xhr); xhr.ontimeout=onErrorTimeout(xhr); xhr.open('GET', base); xhr.send(); inProgressCount +=1; }} }}else{ if(!isHidden){ if(cache[base]===undefined){ cache[base]=true; }else if(cache[base].onload){ cache[base].abort(); delete cache[base].onload; cache[base]=true; }}else if(base.length&&cache[base]){ attrUpdateFunc({ useEl: uses[i], base: base, hash: hash })(); }} } uses=''; inProgressCount +=1; observeIfDone(); }; window.addEventListener('load', function winLoad(){ window.removeEventListener('load', winLoad, false); tid=setTimeout(checkUseElems, 0); }, false); }}()); (function ($){ "use strict"; var extcf7_show_animation={ "height": "show", "marginTop": "show", "marginBottom": "show", "paddingTop": "show", "paddingBottom": "show" }; var extcf7_hide_animation={ "height": "hide", "marginTop": "hide", "marginBottom": "hide", "paddingTop": "hide", "paddingBottom": "hide" }; var extcf7_animation_status=extcf7_conditional_settings.animitation_status; var extcf7_animation_intime=parseInt(extcf7_conditional_settings.animitation_in_time); var extcf7_animation_out_time=parseInt(extcf7_conditional_settings.animitation_out_time); var condition_depends_field=[]; function extcf7_global(){ $('.wpcf7-form').each(function(){ var options_element=$(this).find('input[name="_extcf7_conditional_options"]').eq(0); if(!options_element.length||!options_element.val()){ return false; } var form_options=JSON.parse(options_element.val()); form_options.conditions.forEach(function(form_item,i){ var rule_applied_field=$('[data-id="'+form_item.rule_applied_field+'"]'); form_item.and_condition_rules.forEach(function(rules,j){ if(!condition_depends_field.includes(rules.if_field_input)){ condition_depends_field.push(rules.if_field_input); } var from_field_selector=extcf7_input_checkbox_name(rules.if_field_input); var tag=from_field_selector.get(0); extcf7_check_condition(form_item.and_condition_rules, rule_applied_field); if(tag.tagName=='INPUT'){ var input_attr_type=from_field_selector.attr('type'); if(input_attr_type=='text'){ from_field_selector.on('keyup',function(){ extcf7_check_condition(form_item.and_condition_rules,rule_applied_field); }); }else if(input_attr_type=='email'){ from_field_selector.on('keyup',function(){ extcf7_check_condition(form_item.and_condition_rules,rule_applied_field); }); }else if(input_attr_type=='radio'){ from_field_selector.on('change',function(){ extcf7_check_condition(form_item.and_condition_rules,rule_applied_field); }); }else if(input_attr_type=='checkbox'){ from_field_selector.on('change',function(){ extcf7_check_condition(form_item.and_condition_rules,rule_applied_field); }); }}else if(tag.tagName=='SELECT'){ from_field_selector.on('change',function(){ extcf7_check_condition(form_item.and_condition_rules,rule_applied_field); }); }else if(tag.tagName=='TEXTAREA'){ from_field_selector.on('keyup',function(){ extcf7_check_condition(form_item.and_condition_rules,rule_applied_field); }); }}); }); }); } function extcf7_check_condition(coditions_rules,rule_applied_field){ var condition_status=extcf7_is_condition_ok(coditions_rules); if(condition_status){ if('on'==extcf7_animation_status){ rule_applied_field.animate(extcf7_show_animation, extcf7_animation_intime); }else{ rule_applied_field.show(); }}else{ if(rule_applied_field.data('clear')!==undefined){ clear_fied_on_hide(rule_applied_field); } if('on'==extcf7_animation_status){ rule_applied_field.animate(extcf7_hide_animation, extcf7_animation_out_time); }else{ rule_applied_field.hide(); }} } function extcf7_input_checkbox_name(from_field_selector){ var input_tag=$(`[name="${from_field_selector}"]`); if(typeof input_tag.get(0)==="undefined"){ input_tag=$(`[name="${from_field_selector}[]"]`); } return input_tag; } function extcf7_is_condition_ok(conditions){ var condition_status; var conditon_length=conditions.length; var pre_input_val; var current_input_val; var pre_cnd; var current_cnd; var next_input_val; var next_cnd; for (var k=0; k < conditon_length; k++){ if('and'==conditions[k].if_type_input||'or'==conditions[k].if_type_input){ pre_input_val=extcf7_get_input_val(conditions[k-1]); current_input_val=extcf7_get_input_val(conditions[k]); pre_cnd=extcf7_compare_condition(conditions[k-1], pre_input_val); current_cnd=extcf7_compare_condition(conditions[k], current_input_val); if(k < conditon_length - 1){ next_input_val=extcf7_get_input_val(conditions[k+1]); next_cnd=extcf7_compare_condition(conditions[k+1], next_input_val); }} if(!conditions[k].if_type_input){ var if_field_input_value=extcf7_get_input_val(conditions[k]); var field_value_status=extcf7_compare_condition(conditions[k],if_field_input_value); if(conditon_length > 1){ condition_status=extcf7_1st_cnd_method(conditions,field_value_status); return condition_status; break; }else{ condition_status=field_value_status; }}else if('and'==conditions[k].if_type_input){ if(conditions[k+1].if_type_input=='and'){ condition_status=pre_cnd&¤t_cnd&&next_cnd ? true:false; }else{ condition_status=(pre_cnd&¤t_cnd)||next_cnd ? true:false; }}else if('or'==conditions[k].if_type_input){ if(conditions[k+1].if_type_input=='and'){ condition_status=(pre_cnd||current_cnd)&&next_cnd ? true:false; }else{ condition_status=(pre_cnd||current_cnd)||next_cnd ? true:false; }} } return condition_status; } function extcf7_1st_cnd_method(conditions,first_value_status){ var cnd_status=first_value_status; var input_value; var value_status; for (var i=1; i < conditions.length; i++){ input_value=extcf7_get_input_val(conditions[i]); value_status=extcf7_compare_condition(conditions[i],input_value); if(conditions[i].if_type_input=='and'){ cnd_status=cnd_status&&value_status; }else{ cnd_status=cnd_status||value_status; }} return cnd_status; } function extcf7_compare_condition(rules,input_value){ if(rules.operator_input=="equal"){ if(input_value==rules.if_value_input){ return true; }}else if(rules.operator_input=="not-equal"){ if(input_value!=rules.if_value_input){ return true; }} return false; } function extcf7_get_input_val(rules){ var if_input_value; var if_input_selector=extcf7_input_checkbox_name(rules.if_field_input); if(if_input_selector.get(0).tagName=='INPUT'&&if_input_selector.attr('type')=='checkbox'){ if(if_input_selector.prop("checked")==true){ if_input_value="checked" }else if(if_input_selector.prop("checked")==false){ if_input_value="unchecked" }}else if(if_input_selector.get(0).tagName=='INPUT'&&if_input_selector.attr('type')=='radio'){ var radio_selector=$(':input[value="'+rules.if_value_input+'"]'); if(radio_selector.prop("checked")){ if_input_value=radio_selector.val(); }}else{ if_input_value=if_input_selector.val(); } return if_input_value; } function clear_fied_on_hide(rule_applied_field){ var $inputs=$(':input', rule_applied_field).not(':button, :submit, :reset, :hidden'); $inputs.each(function(){ var $this=$(this); $this.val(this.defaultValue); $this.prop('checked', this.defaultChecked); if(condition_depends_field.includes($this.attr('name'))){ $this.trigger("change"); $this.trigger("keyup"); }}); $('textarea', rule_applied_field).each(function(){ var $this=$(this); $this.val(this.defaultValue); if(condition_depends_field.includes($this.attr('name'))){ $this.trigger("keyup"); }}); $('select', rule_applied_field).each(function(){ var $this=$(this); if($this.val()===null){ $this.val($("option:first",$this).val()); if(condition_depends_field.includes($this.attr('name'))){ $this.trigger("change"); }} }); } extcf7_global(); if('true'===extcf7_conditional_settings.elementor_editor_mode){ $(window).on('elementor/frontend/init', function (){ elementorFrontend.hooks.addAction('frontend/element_ready/widget', function($scope, $){ extcf7_global(); }); }); }})(jQuery); (function ($){ "use strict"; var redirection_enable='off'; var redirection_url=''; var page_form_id=''; var redirect_form_id=''; var redirect_options=''; document.addEventListener('wpcf7submit', function(event){ page_form_id=$(event.target).find('input[name="_wpcf7"]').eq(0).val(); var get_options=$(event.target).find('input[name="_extcf7_redirect_options"]').eq(0).val(); if(get_options){ var option_values=JSON.parse(get_options); redirect_form_id=option_values.form_id; redirect_options=option_values.redirect_options; if(redirect_options){ redirection_enable=redirect_options.redirection_enable; redirection_url='off'==redirect_options.custom_url_enable ? redirect_options.redirect_page:extcf7_get_custom_url(redirect_options.custom_urle); }} }, false); document.addEventListener('wpcf7mailsent', function (event){ var redirect_delay=parseInt(extcf7_redirection_settings.redirection_delay); setTimeout(function(){ if('off'==redirection_enable&&page_form_id==redirect_form_id){ return; } if('on'==redirect_options.js_action){ if(redirect_options.javascript_code){ eval(redirect_options.javascript_code); }} if('off'==redirect_options.redirect_new_tab){ window.location=redirection_url; }else{ window.open(redirection_url); }}, redirect_delay); }, false); function extcf7_get_custom_url(url){ var url_input=/\[(.*?)\]/g.test(url); if(!url_input){ return url; } var redirect_url=""; var url_inputs=url.match(/\[(.*?)\]/g); var url_inputs_names=[]; var i=0; url_inputs.forEach(function(item, index){ url_inputs_names.push(item.replace("[", "").replace("]", "")); }); url_inputs_names.forEach(function(item, index){ var inputs_val; var inputs_tag=$(`[name="${item}"]`).get(0).tagName; if(inputs_tag=='INPUT'){ var input_attr_type=$(`[name="${item}"]`).attr('type'); if(input_attr_type=='text'){ inputs_val=$('input[name="'+item+'"]').val(); }else if(input_attr_type=='radio'){ inputs_val=$('input[name="'+item+'"]:checked').val(); }}else if(inputs_tag=='SELECT'){ inputs_val=$('select[name="'+item+'"] option').filter(':selected').val(); } redirect_url=url.replace(url_inputs[i], inputs_val); url=redirect_url; i++; }); return url; }})(jQuery); window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o 0){ if(country_name==""){ var $ipurl='https://www.cloudflare.com/cdn-cgi/trace'; jQuery.get($ipurl, function (cloudflaredata){ var currentCountry=cloudflaredata.match("loc=(.*)"); if(currentCountry.length > 1){ currentCountry=currentCountry[1]; if(currentCountry){ currentCountry=currentCountry.toUpperCase(); country_name=currentCountry; if(jQuery.inArray(currentCountry, e.chaty_widgets[activeIndexID].countries)!=-1){ set_widget_data(activeIndexID); }} currentCountryCount++; setTimeout(function(){ check_for_widget_data(currentCountryCount); },25); }}); }else{ if(jQuery.inArray(country_name, e.chaty_widgets[activeIndexID].countries)!=-1){ set_widget_data(activeIndexID); } currentCountryCount++; setTimeout(function(){ check_for_widget_data(currentCountryCount); },10); }}else{ set_widget_data(index); currentCountryCount++; setTimeout(function(){ check_for_widget_data(currentCountryCount); },10); }} } if(e.chaty_widgets.length > 0){ if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))){ isChatyInMobile=true; } if(isChatyInMobile){ jQuery("body").addClass("chaty-in-mobile"); }else{ jQuery("body").addClass("chaty-in-desktop"); } var botPattern="(googlebot\/|bot|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)"; var re=new RegExp(botPattern, 'i'); var userAgent=navigator.userAgent; if(re.test(userAgent)){ isBoatUser=true; } currentCountryCount=0; check_for_widget_data(currentCountryCount); } function set_widget_data(index){ widget_status=false; for(var i=0; i"; htmlString +=""; jQuery("body").append(htmlString); var thisIndex=jQuery(this).closest(".chaty-widget").attr("data-index"); if(chaty_settings.chaty_widgets[thisIndex]['mode']=="horizontal"){ jQuery(".wechat-qr-code").css("bottom", (parseInt(chaty_settings.chaty_widgets[thisIndex]['bot'])+parseInt(chaty_settings.chaty_widgets[thisIndex]['widget_size'])+25)+"px"); if(chaty_settings.chaty_widgets[thisIndex]['pos_side']=="right"){ jQuery(".wechat-qr-code").css("left", "auto").css("right", chaty_settings.chaty_widgets[thisIndex]['side']+"px"); }else{ jQuery(".wechat-qr-code").css("right", "auto").css("left", chaty_settings.chaty_widgets[thisIndex]['side']+"px"); }}else{ jQuery(".wechat-qr-code").css("bottom", parseInt(chaty_settings.chaty_widgets[thisIndex]['bot'])+"px"); if(chaty_settings.chaty_widgets[thisIndex]['pos_side']=="right"){ jQuery(".wechat-qr-code").css("left", "auto").css("right", (parseInt(chaty_settings.chaty_widgets[thisIndex]['side'])+parseInt(chaty_settings.chaty_widgets[thisIndex]['widget_size'])+25)+"px"); }else{ jQuery(".wechat-qr-code").css("right", "auto").css("left", (parseInt(chaty_settings.chaty_widgets[thisIndex]['side'])+parseInt(chaty_settings.chaty_widgets[thisIndex]['widget_size'])+25)+"px"); }} }}); jQuery(document).on("click", ".i-trigger .i-trigger-open", function(){ if(!isBoatUser){ var widget_index=jQuery(this).closest(".chaty-widget").attr("data-index"); var widgetIndex=chaty_settings.chaty_widgets[widget_index].widget_index; var widgetNonce=chaty_settings.chaty_widgets[widget_index].widget_nonce; var isExpired=check_chaty_cookie_expired("wcf"+widgetIndex); if(isExpired){ save_chaty_cookie_string("wcf"+widgetIndex); jQuery.ajax({ url: chaty_settings.ajax_url, data: "index=" + widgetIndex + "&nonce=" + widgetNonce + "&is_widget=1&channel=&type=click&action=update_chaty_channel_status", type: 'post', async: true, defer: true, success: function (){ }}); }} }); jQuery(document).on("click", ".chaty-main-widget", function(){ if(!isBoatUser){ if(!jQuery(this).closest(".chaty-widget").hasClass("one_widget")){ var widget_index=jQuery(this).closest(".chaty-widget").attr("data-index"); var widgetIndex=chaty_settings.chaty_widgets[widget_index].widget_index; var widgetNonce=jQuery(this).attr("data-nonce"); var widgetChannel=jQuery(this).attr("data-channel"); if(check_chaty_cookie_expired("wcf"+widgetIndex+"_"+widgetChannel)){ save_chaty_cookie_string("wcf"+widgetIndex+"_"+widgetChannel); jQuery.ajax({ url: chaty_settings.ajax_url, data: "index=" + widgetIndex + "&nonce=" + widgetNonce + "&is_widget=0&channel=" + widgetChannel + "&type=click&action=update_chaty_channel_status", type: 'post', async: true, defer: true, success: function (){ }}); }}else{ var widget_index=jQuery(this).closest(".chaty-widget").attr("data-index"); var widgetIndex=chaty_settings.chaty_widgets[widget_index].widget_index; var widgetNonce=chaty_settings.chaty_widgets[widget_index].widget_nonce; var widgetChannel=jQuery(this).attr("data-channel"); var clickStatus=check_chaty_cookie_expired("wcf"+widgetIndex+"_"+widgetChannel); if(clickStatus){ save_chaty_cookie_string("wcf"+widgetIndex+"_"+widgetChannel); } var widgetStatus=check_chaty_cookie_expired("wcf"+widgetIndex); var is_widget=0; if(widgetStatus){ is_widget=1; save_chaty_cookie_string("wcf"+widgetIndex); } if(is_widget||clickStatus){ jQuery.ajax({ url: chaty_settings.ajax_url, data: "index=" + widgetIndex + "&nonce=" + widgetNonce + "&is_widget=" + is_widget + "&channel=" + widgetChannel + "&type=click&action=update_chaty_channel_status", type: 'post', async: true, defer: true, success: function (){ }}); }} }}); } set_trigger_variables(); if(pageScrollStatus){ page_scroll_functions(); } if(timeIntervalStatus){ time_interval_function(); } if(exitIntentStatus){ exit_intent_function(); }} jQuery(window).resize(function(){ set_chaty_widget_size(); }); function set_chaty_channels(thisIndex){ if(isChatyInMobile){ jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop:not(.is-in-mobile)").remove(); }else{ jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile:not(.is-in-desktop)").remove(); } set_trigger_variables(); var activeWidget=jQuery("#chaty-channel-box-"+thisIndex).find(".chaty-widget-i").length; if(activeWidget==0){ jQuery("#chaty-widget-"+thisIndex).remove(); }else if(activeWidget==1){ var htmlToAdd=jQuery("#chaty-channel-box-"+thisIndex+" .chaty-widget-i:first").clone(); jQuery("#chaty-widget-"+thisIndex).find(".i-trigger").html(htmlToAdd); jQuery("#chaty-widget-"+thisIndex).addClass("one_widget"); jQuery("#chaty-widget-"+thisIndex).find(".i-trigger .chaty-widget-i-title p").text(chaty_settings.chaty_widgets[thisIndex]['cta']); jQuery("#chaty-widget-"+thisIndex).find(".i-trigger").addClass("one-widget"); } jQuery("#chaty-widget-"+thisIndex+" .i-trigger svg, #chaty-widget-"+thisIndex+" .i-trigger img").wrap(function(){ return "
"; }); if(chaty_settings.chaty_widgets[thisIndex]['font_family']!=""){ jQuery("head").append(""); jQuery("#chaty-widget-"+thisIndex).css("font-family", chaty_settings.chaty_widgets[thisIndex]['font_family']); } var CTAStatus=get_cta_status(thisIndex); if(!CTAStatus){ jQuery("#chaty-widget-"+thisIndex+" .i-trigger .i-trigger-open").addClass("no-tooltip"); jQuery("#chaty-widget-"+thisIndex+" .i-trigger.one-widget").addClass("no-tooltip"); set_cta_status(thisIndex); } if(chaty_settings.chaty_widgets[thisIndex]['animation_class']!=""){ var widgetIndex=chaty_settings.chaty_widgets[thisIndex].widget_index; var animationStatus=is_chaty_settings_expired("ca"+widgetIndex); if(animationStatus){ jQuery("#chaty-animation-"+thisIndex).addClass("chaty-animation-"+chaty_settings.chaty_widgets[thisIndex]['animation_class']); }} jQuery("#chaty-widget-"+thisIndex).addClass(chaty_settings.chaty_widgets[thisIndex]['mode']+"-cht-menu"); jQuery("#chaty-widget-"+thisIndex).addClass(chaty_settings.chaty_widgets[thisIndex]['pos_side']+"-cht-position"); if(chaty_settings.chaty_widgets[thisIndex]['pos_side']=="right"){ jQuery("#chaty-widget-" + thisIndex).addClass("chaty-widget-is-left"); jQuery("#chaty-widget-" + thisIndex).css({ left: "auto", right: chaty_settings.chaty_widgets[thisIndex]['side']+"px", bottom: chaty_settings.chaty_widgets[thisIndex]['bot']+"px" }); }else{ jQuery("#chaty-widget-" + thisIndex).addClass("chaty-widget-is-right"); jQuery("#chaty-widget-" + thisIndex).css({ right: "auto", left: chaty_settings.chaty_widgets[thisIndex]['side']+"px", bottom: chaty_settings.chaty_widgets[thisIndex]['bot']+"px" }) } var widgetIndex=chaty_settings.chaty_widgets[thisIndex].widget_index; var displayStatus=is_chaty_settings_expired("cs"+widgetIndex); if(!displayStatus){ jQuery("#chaty-widget-"+thisIndex).removeClass("hide-widget"); chaty_settings.widget_status[thisIndex]['is_displayed']=1; trigget_widget_displayed_status(thisIndex); }else{ if(chaty_settings.chaty_widgets[thisIndex]['time_trigger']=="no"&&chaty_settings.chaty_widgets[thisIndex]['exit_intent']=="no"&&chaty_settings.chaty_widgets[thisIndex]['on_page_scroll']=="no"){ save_chaty_settings("cs"+widgetIndex); jQuery("#chaty-widget-"+thisIndex).removeClass("hide-widget"); chaty_settings.widget_status[thisIndex]['is_displayed']=1; trigget_widget_displayed_status(thisIndex); } if(chaty_settings.chaty_widgets[thisIndex]['time_trigger']=="yes"&&parseInt(chaty_settings.chaty_widgets[thisIndex]['trigger_time']) <=0){ save_chaty_settings("cs"+widgetIndex); jQuery("#chaty-widget-"+thisIndex).removeClass("hide-widget"); chaty_settings.widget_status[thisIndex]['is_displayed']=1; trigget_widget_displayed_status(thisIndex); } if(chaty_settings.chaty_widgets[thisIndex]['on_page_scroll']=="yes"&&parseInt(chaty_settings.chaty_widgets[thisIndex]['page_scroll']) <=0){ save_chaty_settings("cs"+widgetIndex); jQuery("#chaty-widget-"+thisIndex).removeClass("hide-widget"); chaty_settings.widget_status[thisIndex]['is_displayed']=1; trigget_widget_displayed_status(thisIndex); }} if(chaty_settings.chaty_widgets[thisIndex]['display_state']=="open"){ if(!jQuery("#chaty-widget-"+thisIndex).hasClass("one_widget")){ jQuery("#chaty-widget-"+thisIndex).removeClass("none-widget-show").addClass("chaty-widget-show"); } jQuery("#chaty-widget-"+thisIndex+" .i-trigger.one-widget, #chaty-widget-"+thisIndex+" .i-trigger .i-trigger-open").addClass("no-tooltip"); jQuery("#chaty-widget-"+thisIndex+" .i-trigger .i-trigger-open").addClass("true"); if(chaty_settings.chaty_widgets[thisIndex]['has_close_button']=="no"){ jQuery("#chaty-widget-"+thisIndex).addClass("has-not-close-button"); if(!jQuery("#chaty-widget-"+thisIndex).hasClass("one_widget")){ jQuery("#chaty-widget-"+thisIndex+" .i-trigger").remove(); }} }else if(chaty_settings.chaty_widgets[thisIndex]['display_state']=="hover"){ jQuery(document).on("mouseenter", ".i-trigger .i-trigger-open" , function(){ if(!jQuery(this).hasClass("hover-action")&&(jQuery(this).closest(".chaty-widget").hasClass("none-widget-show")||!jQuery(this).closest(".chaty-widget").hasClass("chaty-widget-show"))){ if(!jQuery(this).closest(".chaty-widget").hasClass("one_widget")){ jQuery(this).closest(".chaty-widget").removeClass("none-widget-show").addClass("chaty-widget-show"); } jQuery(this).addClass("no-tooltip"); jQuery(this).addClass("hover-action"); var thisIndex=jQuery(this).closest(".chaty-widget").attr("data-index"); set_cta_status(thisIndex); var widgetIndex=chaty_settings.chaty_widgets[thisIndex].widget_index; save_chaty_settings("ca" + widgetIndex); if(chaty_settings.chaty_widgets[thisIndex]['animation_class']!=""){ jQuery("#chaty-animation-" + thisIndex).removeClass("chaty-animation-" + chaty_settings.chaty_widgets[thisIndex]['animation_class']); }} }); } jQuery(".chaty-widget-i-title").each(function (){ if(jQuery(this).text()==""){ jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"); jQuery(this).remove(); }}); } function exit_intent_function(){ function addEvent(obj, evt, fn){ if(obj.addEventListener){ obj.addEventListener(evt, fn, false); } else if(obj.attachEvent){ obj.attachEvent("on" + evt, fn); }} addEvent(document, 'mouseout', function (evt){ if(evt.toElement==null&&evt.relatedTarget==null){ trigger_exit_intent(); }}); } function get_cta_status(widget_index){ var widgetIndex=chaty_settings.chaty_widgets[widget_index].widget_index; var cookieStr="cta"+widgetIndex; var cookieValue=check_for_chaty_settinigs(cookieStr); if(cookieValue!=null&&cookieValue!=""){ cookieValue=new Date(cookieValue); var diffTime=Math.abs(new Date() - cookieValue); var diffMin=Math.floor(diffTime / (1000 * 60)); if(diffMin >=10){ return true; }else{ return false; }} return true; } function check_for_chaty_settinigs(cookieStr){ var cookieString=get_chaty_cookie("chaty_settings"); var cookieArray=[]; if(cookieString!=null&&cookieString!=""){ cookieArray=JSON.parse(cookieString); } if(cookieArray.length > 0){ for(var i=0; i 0){ for(var i=0; i=1){ return true; }else{ return false; }} return true; } function trigger_exit_intent(){ if(exitIntentStatus){ for (var i=0; i < chaty_settings.chaty_widgets.length; i++){ if(chaty_settings.chaty_widgets[i]['exit_intent']=="yes"&&chaty_settings.widget_status[i]['is_displayed']==0){ jQuery("#chaty-widget-" + i).removeClass("hide-widget"); trigget_widget_displayed_status(i); var widgetIndex=chaty_settings.chaty_widgets[i].widget_index; save_chaty_settings("cs" + widgetIndex); chaty_settings.widget_status[i]['is_displayed']=1; chaty_settings.chaty_widgets[i]['exit_intent']="no"; jQuery("#chaty-widget-" + i).append("
"); jQuery("#chaty-widget-" + i + " .chaty-nav").addClass(chaty_settings.chaty_widgets[i]['pos_side']); launch_chaty(i+1); setTimeout(function(){ jQuery(".chaty-nav").addClass("active"); }, 100); setTimeout(function(){ jQuery(".chaty-nav").remove(); }, 2500); }} set_trigger_variables(); }} function time_interval_function(){ if(timeIntervalStatus){ for (var i=0; i < chaty_settings.chaty_widgets.length; i++){ if(chaty_settings.chaty_widgets[i]['time_trigger']=="yes"&&chaty_settings.widget_status[i]['is_displayed']==0){ var timeToDisplay=parseInt(chaty_settings.chaty_widgets[i]['trigger_time'])*1000; if(timeToDisplay <=maxTimeInterval){ jQuery("#chaty-widget-" + i).removeClass("hide-widget"); trigget_widget_displayed_status(i); var widgetIndex=chaty_settings.chaty_widgets[i].widget_index; save_chaty_settings("cs" + widgetIndex); chaty_settings.widget_status[i]['is_displayed']=1; chaty_settings.chaty_widgets[i]['time_trigger']="no"; }} } set_trigger_variables(); maxTimeInterval=maxTimeInterval+100; if(timeIntervalStatus){ setTimeout(function(){ time_interval_function(); }, 100); }} } function page_scroll_functions(){ jQuery(window).scroll(function (){ if(pageScrollStatus){ var scrollHeight=jQuery(document).height() - jQuery(window).height(); var scrollPos=jQuery(window).scrollTop(); if(scrollPos!=0){ var scrollPer=((scrollPos / scrollHeight) * 100); for (var i=0; i < chaty_settings.chaty_widgets.length; i++){ if(chaty_settings.chaty_widgets[i]['on_page_scroll']=="yes"&&chaty_settings.widget_status[i]['is_displayed']==0){ var widgetScroll=parseInt(chaty_settings.chaty_widgets[i]['page_scroll']); if(scrollPer >=widgetScroll){ jQuery("#chaty-widget-" + i).removeClass("hide-widget"); trigget_widget_displayed_status(i); var widgetIndex=chaty_settings.chaty_widgets[i].widget_index; save_chaty_settings("cs" + widgetIndex); chaty_settings.widget_status[i]['is_displayed']=1; chaty_settings.chaty_widgets[i]['on_page_scroll']="no"; }} } set_trigger_variables(); }} }); } function clear_trigger_variables(){ pageScrollStatus=false; timeIntervalStatus=false; exitIntentStatus=false; } function set_trigger_variables(){ clear_trigger_variables(); jQuery(".chaty-widget").each(function(){ var thisIndex=jQuery(this).attr("data-index"); if(chaty_settings.widget_status[thisIndex]['on_page_status']==1&&chaty_settings.widget_status[thisIndex]['is_displayed']==0){ if(chaty_settings.chaty_widgets[thisIndex]['time_trigger']=="yes"){ if(parseInt(chaty_settings.chaty_widgets[thisIndex]['trigger_time']) > 0){ timeIntervalStatus=true; }else{ chaty_settings.chaty_widgets[thisIndex]['time_trigger']=="no"; }} if(chaty_settings.chaty_widgets[thisIndex]['on_page_scroll']=="yes"){ if(parseInt(chaty_settings.chaty_widgets[thisIndex]['page_scroll']) > 0){ pageScrollStatus=true; }else{ chaty_settings.chaty_widgets[thisIndex]['on_page_scroll']=="no"; }} if(chaty_settings.chaty_widgets[thisIndex]['exit_intent']=="yes"){ exitIntentStatus=true; }} }); } function set_chaty_widget_size(){ if(jQuery(".chaty-channels").length){ jQuery(".chaty-channels").each(function(){ var thisIndex=parseInt(jQuery(this).attr("data-index")); var widgetSize=parseInt(chaty_settings.chaty_widgets[thisIndex]['widget_size']); var totalWidget=parseInt(jQuery(this).find(".chaty-widget-i.is-in-desktop").length); if(!jQuery("body").hasClass("chaty-in-desktop")){ totalWidget=parseInt(jQuery(this).find(".chaty-widget-i.is-in-mobile").length); } jQuery(this).find(".chaty-widget-i").css({ height: widgetSize+"px", width: widgetSize+"px" }).find("img").css({ height: widgetSize+"px", width: widgetSize+"px" }).find("span").css({ height: widgetSize+"px", width: widgetSize+"px" }); jQuery("#chaty-widget-"+thisIndex+" .chaty-widget-i, #chaty-widget-"+thisIndex+" .i-trigger .i-trigger-open, #chaty-widget-"+thisIndex+" .i-trigger .i-trigger-close, #chaty-widget-"+thisIndex+" .i-trigger .animation-svg").css({ height: widgetSize+"px", width: widgetSize+"px" }); jQuery(this).css({top: "-" + 100 * totalWidget + "%"}); if(chaty_settings.chaty_widgets[thisIndex].mode=="horizontal"){ jQuery(this).css({top: "0"}); jQuery(this).width(totalWidget * (parseInt(widgetSize) + 8)); jQuery(this).height(parseInt(widgetSize) + 8); }else{ jQuery(this).height(totalWidget * (parseInt(widgetSize) + 8)); jQuery(this).width(parseInt(widgetSize) + 8); }}); }} function check_for_time(){ var displayStatus=0; if(parseInt(chaty_settings.object_settings.display_conditions)==1){ var displayRules=chaty_settings.object_settings.display_rules; if(displayRules.length > 0){ var localDate=new Date(); localDate.setHours(localDate.getHours() + (chaty_settings.object_settings.gmt)); var utcHours=localDate.getUTCHours(); var utcMin=localDate.getUTCMinutes(); var utcDay=localDate.getUTCDay(); for (var rule=0; rule < displayRules.length; rule++){ var hourStatus=0; var minStatus=0; var checkForTime=0; if(displayRules[rule].days==-1){ checkForTime=1; }else if(displayRules[rule].days >=0&&displayRules[rule].days <=6){ if(displayRules[rule].days==utcDay){ checkForTime=1; }}else if(displayRules[rule].days==7){ if(utcDay >=0&&utcDay <=4){ checkForTime=1; }}else if(displayRules[rule].days==8){ if(utcDay >=1&&utcDay <=5){ checkForTime=1; }}else if(displayRules[rule].days==9){ if(utcDay==5||utcDay==6){ checkForTime=1; }} if(checkForTime==1){ if(utcHours > displayRules[rule].start_hours&&utcHours < displayRules[rule].end_hours){ hourStatus=1; }else if(utcHours==displayRules[rule].start_hours&&utcHours < displayRules[rule].end_hours){ if(utcMin >=displayRules[rule].start_min){ hourStatus=1; }}else if(utcHours > displayRules[rule].start_hours&&utcHours==displayRules[rule].end_hours){ if(utcMin <=displayRules[rule].end_min){ hourStatus=1; }}else if(utcHours==displayRules[rule].start_hours&&utcHours==displayRules[rule].end_hours){ if(utcMin >=displayRules[rule].start_min&&utcMin <=displayRules[rule].end_min){ hourStatus=1; }} if(hourStatus==1){ if(utcMin >=displayRules[rule].start_min&&utcMin <=displayRules[rule].end_min){ minStatus=1; }} } if(hourStatus==1&&checkForTime==1){ displayStatus=1; } if(displayStatus==1){ rule=displayRules.length + 1; }} }else{ displayStatus=1; }}else{ displayStatus=1; } return displayStatus; } function set_chaty_widget(widgetIndex){ ""!=i("display_cta"), token="", jQuery(document).ready(function (){ "true"==e.object_settings.active&&(function (e, n){ var o=e.object_settings.device, a=""; if("right"==e.object_settings.position) a="left: auto;bottom: 25px; right: 25px;"; else if("left"==e.object_settings.position) a="right: auto; bottom: 25px; left: 25px;"; else if("custom"==e.object_settings.position){ var c=e.object_settings.pos_side, s=e.object_settings.bot, r=e.object_settings.side; a="right"===c ? "left: auto; bottom: " + s + "px; right: " + r + "px":"left: " + r + "px; bottom: " + s + "px; right: auto" } var g=e.object_settings.cta, d="", l=e.object_settings.social; if(Object.keys(l).length >=1&&(d='
', d +='
'), d +=function (e){ var i="", n=0; return t.each(e.object_settings.social, function (t, o){ if(e.object_settings.isPRO&&jQuery("body").addClass("has-pro-version"), !e.object_settings.isPRO&&"3"==++n) return !1; extra_class="", "1"!=e.object_settings.analytics&&1!=e.object_settings.analytics||(extra_class +=" update-analytics "); var desktopClass=(e.object_settings.social[t].is_desktop==1) ? "is-in-desktop":""; var mobileClass=(e.object_settings.social[t].is_mobile==1) ? "is-in-mobile":""; var targetAction=(e.object_settings.is_mobile==1) ? e.object_settings.social[t].mobile_target:e.object_settings.social[t].desktop_target; if(jQuery("body").hasClass("chaty-in-mobile")){ e.object_settings.social[t].href_url=e.object_settings.social[t].mobile_url; } var onclick_settings=""; if(e.object_settings.social[t].on_click!=""){ onclick_settings=' onclick="'+e.object_settings.social[t].on_click+'"'; } if(e.object_settings.social[t].channel_type=="viber"){ if(jQuery("body").hasClass("chaty-in-mobile")){ var viberVal=e.object_settings.social[t].href_url; viberVal=viberVal.replace("+", ""); if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){ viberVal="+" + viberVal; } e.object_settings.social[t].href_url=viberVal; } e.object_settings.social[t].href_url="viber://chat?number=" + e.object_settings.social[t].href_url; } extra_class +=" "+e.object_settings.social[t].channel_type+"-action-btn "; extra_class +=" "+e.object_settings.social[t].social_channel+"-"+widgetIndex+"-channel "; socialString='
', bgColor="", ""!=e.object_settings.social[t].bg_color&&(socialString +="", bgColor="style='background-color: " + e.object_settings.social[t].bg_color + ";'"), socialString +="", ""!=e.object_settings.social[t].img_url ? socialString +="" + e.object_settings.social[t].title + "":socialString +=e.object_settings.social[t].default_icon, socialString +="", socialString +="

" + e.object_settings.social[t].title + "

", socialString +="
"; i +=socialString; }), i }(e), l=e.object_settings.social, Object.keys(l).length >=1){ d +="
", d +='
'; var h=i("display_cta"); var CU=current_url=window.location.origin; CU=CU.replace("https://", ""); CU=CU.replace("http://", ""); if(""!=g&&"none"!=h) var p="true"; else p="no-tooltip"; d +='
', d +=function (t){ switch (t.object_settings.widget_type){ case"chat-image": if(t.object_settings.widget_img.length > 1) return '
'; case"chat-smile": return ''; case"chat-bubble": return ''; case"chat-db": return ''; default: return '' }}(e), h=i("display_cta"), ""!=g&&"none"!=h&&(d +='
', d +=g, d +="
"), d +="
", d +='
', ""==e.object_settings.close_img ? (d +='', d +='', d +='', d +='', d +=""):d +="" + e.object_settings.close_text + "", d +='
', d +=e.object_settings.close_text, d +="
", d +="
", d +="
", 0===n.length&&!e.object_settings.isPRO&&(d +=''), d +="
"; } else ; t("body").append(d); set_chaty_channels(widgetIndex); load_chaty_functions(); set_chaty_widget_size(); }(e, token)); }); } function set_cta_status(widget_index){ var widgetIndex=chaty_settings.chaty_widgets[widget_index].widget_index; var cookieStr="cta"+widgetIndex; var cookieString=get_chaty_cookie("chaty_settings"); var cookieArray=[]; if(cookieString!=null&&cookieString!=""){ cookieArray=JSON.parse(cookieString); } var cookieFound=false; if(cookieArray.length > 0){ for(var i=0; i 0){ for(var i=0; i 0){ for(var i=0; i=2){ return true; }else{ return false; }} return true; } function trigget_widget_displayed_status(widget_index){ if(!isBoatUser){ var widgetIndex=chaty_settings.chaty_widgets[widget_index].widget_index; var widgetNonce=chaty_settings.chaty_widgets[widget_index].widget_nonce; var isExpired=check_chaty_cookie_expired("cwds"+widgetIndex); if(isExpired){ save_chaty_cookie_string("cwds"+widgetIndex); var socialChannels=""; if(jQuery("#chaty-widget-" + widgetIndex).hasClass("single_widget")){ if(jQuery("#chaty-widget-" + widget_index + " .i-trigger.one-widget > .chaty-main-widget").length){ var channelKey="cwds" + widgetIndex + "_" + jQuery("#chaty-widget-" + widget_index + " .i-trigger.one-widget > .chaty-main-widget").attr("data-channel"); if(check_chaty_cookie_expired(channelKey)){ socialChannels=jQuery("#chaty-widget-" + widget_index + " .i-trigger.one-widget > .chaty-main-widget").attr("data-channel"); save_chaty_cookie_string(channelKey); }} }else{ jQuery("#chaty-widget-" + widget_index + " .chaty-channels").find(".chaty-main-widget").each(function (){ var channelKey="cwds" + widgetIndex + "_" + jQuery(this).attr("data-channel"); if(check_chaty_cookie_expired(channelKey)){ socialChannels +=jQuery(this).attr("data-channel") + ","; save_chaty_cookie_string(channelKey); }}); } jQuery.ajax({ url: chaty_settings.ajax_url, data: "index=" + widgetIndex + "&nonce=" + widgetNonce + "&is_widget=1&channel=&type=view&action=update_chaty_channel_status&channels=" + socialChannels, type: 'post', async: true, defer: true, success: function (){ }}); }else{ var socialChannels=""; if(jQuery("#chaty-widget-" + widget_index).hasClass("single_widget")){ if(jQuery("#chaty-widget-" + widget_index + " .i-trigger.one-widget > .chaty-main-widget").length){ var channelKey="cwds" + widgetIndex + "_" + jQuery("#chaty-widget-" + widget_index + " .i-trigger.one-widget > .chaty-main-widget").attr("data-channel"); if(check_chaty_cookie_expired(channelKey)){ socialChannels=jQuery("#chaty-widget-" + widget_index + " .i-trigger.one-widget > .chaty-main-widget").attr("data-channel"); save_chaty_cookie_string(channelKey); }} }else{ jQuery("#chaty-widget-" + widget_index + " .chaty-channels").find(".chaty-main-widget").each(function (){ channelKey="cwds" + widgetIndex + "_" + jQuery(this).attr("data-channel"); if(check_chaty_cookie_expired(channelKey)){ socialChannels +=jQuery(this).attr("data-channel") + ","; save_chaty_cookie_string("cwds" + widgetIndex + "_" + jQuery(this).attr("data-channel")) }}); } if(socialChannels!=""){ jQuery.ajax({ url: chaty_settings.ajax_url, data: "index=" + widgetIndex + "&nonce=" + widgetNonce + "&is_widget=1&channel=&type=view&action=update_chaty_channel_view&channels=" + socialChannels+"&for=channels", type: 'post', async: true, defer: true, success: function (){ }}); }} }} }(jQuery); }, 12: function (t, e){ }}); function launch_chaty(widget_number){ if(widget_number==undefined||widget_number=="widget_index"){ widget_number=1; } widget_number=parseInt(widget_number); var selected_widget=-1; if(chaty_settings.chaty_widgets.length > 0){ for(var i=0; i -1){ if(jQuery("#chaty-widget-"+selected_widget).length){ jQuery("#chaty-widget-"+selected_widget).removeClass("hide-widget"); trigget_widget_displayed_status(selected_widget); jQuery("#chaty-widget-"+selected_widget+" .i-trigger .i-trigger-open").trigger("click"); }}else{ console.log("widget not exists on this page"); }};